{template 'common/header'}
<div class="main">
	<form id="payform" action="{php echo url('profile/printer')}" method="post" class="form-horizontal form" onsubmit="return validate();" ng-controller="paySetting">
		<div class="page-header">
			<h4>无线打印机参数</h4>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">行间距</label>
			<div class="col-sm-9">
				<input type="text" name="printer[lines]" class="form-control" value="" autocomplete="off"/>
				<span class="help-block">设置间距,范围:0 ~ 255,默认6</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">列间距</label>
			<div class="col-sm-9">
				<input type="text" name="printer[columns]" class="form-control" value="" autocomplete="off"/>
				<span class="help-block">设置间距,范围:0 ~ 255,默认30</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">字体宽高</label>
			<div class="col-sm-9">
				<input type="text" name="printer[fontsize]" class="form-control" value="" autocomplete="off"/>
				<span class="help-block">设置倍宽倍高,0为正常字体,10:倍高,20:倍宽,30:倍高倍宽</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">右边空白</label>
			<div class="col-sm-9">
				<input type="text" name="printer[rightspace]" class="form-control" value="" autocomplete="off"/>
				<span class="help-block">设置右边空白,范围:1 ~ 12,默认1</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">缺纸检测</label>
			<div class="col-sm-9">
				<input type="text" name="printer[testing]" class="form-control" value="" autocomplete="off"/>
				<span class="help-block">检测打印机当前状态,短信模式回复(开启返回打印状态才有效!)</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">返回打印状态</label>
			<div class="col-sm-8">
				<label class="radio-inline">
					<input type="radio" name="printer[status]" ng-model="status.switch" value="1"/>
					开启
				</label>
				<label class="radio-inline">
					<input type="radio" name="printer[status]" ng-model="status.switch" value="0"/>
					关闭
				</label>
				<span class="help-block">设置查询打印机状态以短信方式回复</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">打印空白行</label>
			<div class="col-sm-9">
				<input type="text" name="printer[printblank]" class="form-control" value="" autocomplete="off"/>
				<span class="help-block">打印n行空白行</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">打印机初始化</label>
			<div class="col-sm-9">
				<input type="text" name="printer[initialise]" class="form-control" value="" autocomplete="off"/>
				<span class="help-block">执行打印机初始化操作1.清除打印缓存区内容2.恢复默认值</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">错误信息回复</label>
			<div class="col-sm-8">
				<label class="radio-inline">
					<input type="radio" name="printer[errorinfo]" ng-model="errorinfo.switch" value="1"/>
					回复
				</label>
				<label class="radio-inline">
					<input type="radio" name="printer[errorinfo]" ng-model="errorinfo.switch" value="0">
					不回复
				</label>
				<span class="help-block">收到错误命令信息时是否回复,默认不回复</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">发送确认短信</label>
			<div class="col-sm-8">
				<label class="radio-inline">
					<input type="radio" name="printer[message]" ng-model="message.switch" value="1"/>
					发送
				</label>
				<label class="radio-inline">
					<input type="radio" name="printer[message]" ng-model="message.switch" value="0"/>
					不发送
				</label>
				<span class="help-block">是否开通回复确认短信,默认不发送</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">网站地址</label>
			<div class="col-sm-9">
				<input type="text" name="printer[site]" class="form-control" value="" autocomplete="off"/>
				<span class="help-block">HTTP模式同时支持IP地址和域名访问，但建议用固定ip会提高访问效率</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">短信修改密码</label>
			<div class="col-sm-9">
				<input type="text" name="printer[messupdate]" class="form-control" value="" autocomplete="off"/>
				<span class="help-block">此命令慎重，以免误操作影响使用</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">页眉内容</label>
			<div class="col-sm-9">
				<textarea style="height: 100px;" class="form-control" name="printer[header]"></textarea>
				<span class="help-block">收到短信后需要打印在头部内容,默认为空</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">页脚内容</label>
			<div class="col-sm-9">
				<textarea style="height: 100px;" class="form-control" name="printer[footer]"></textarea>
				<span class="help-block">收到短信后需要打印在底部内容,默认为空</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">换行符</label>
			<div class="col-sm-9">
				<input type="text" name="printer[newline]" class="form-control" value="" autocomplete="off"/>
				<span class="help-block">设置换行符<br/>如设置为%%,"abcd%%efg"打印如下:<br/>abcd<br/>efg</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">更新终端时间</label>
			<div class="col-sm-9">
				<input type="text" name="printer[printime]" class="form-control" value="" autocomplete="off"/>
				<span class="help-block">短信模式时校准时钟</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">打印接收时间</label>
			<div class="col-sm-8">
				<label class="radio-inline">
					<input type="radio" name="printer[acceptime]" ng-model="acceptime.switch" value="1"/>
					打印
				</label>
				<label class="radio-inline">
					<input type="radio" name="printer[acceptime]" ng-model="acceptime.switch" value="0"/>
					不打印
				</label>
				<span class="help-block">是否在页尾打印接收时间,默认为打印</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">打印接收号码</label>
			<div class="col-sm-8">
				<label class="radio-inline">
					<input type="radio" name="printer[acceptnum]" ng-model="acceptnum.switch" value="1"/>
					开启
				</label>
				<label class="radio-inline">
					<input type="radio" name="printer[acceptnum]" ng-model="acceptnum.switch" value="0"/>
					关闭
				</label>
				<span class="help-block">是否打印接收号码,默认为打印</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">改变端口号</label>
			<div class="col-sm-9">
				<input type="text" name="printer[port]" class="form-control" value="" autocomplete="off"/>
				<span class="help-block">改变GPRS端口号,默认端口号80</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">设置采集时间</label>
			<div class="col-sm-9">
				<input type="text" name="printer[collectime]" class="form-control" value="" autocomplete="off"/>
				<span class="help-block">采集时间是GPRS完全断网的情况下,打印机终端重新连接间隔时间。默认为1</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">查询站点信息</label>
			<div class="col-sm-9">
				<textarea style="height: 100px;" class="form-control" name="printer[siteinfo]"></textarea>
				<span class="help-block">查询当前GPRS所有设置数据(不包括短信回复内容设置),如果设置IP或路径比较长,可能分几条短信回复</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">打印信息条数</label>
			<div class="col-sm-9">
				<input type="text" name="printer[infonums]" class="form-control" value="" autocomplete="off"/>
				<span class="help-block">打印同样信息的条数,默认为1</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">GPRS功能</label>
			<div class="col-sm-8">
				<label class="radio-inline">
					<input type="radio" name="printer[gprs]" ng-model="gprs.switch" value="1"/>
					开通
				</label>
				<label class="radio-inline">
					<input type="radio" name="printer[gprs]" ng-model="gprs.switch" value="0"/>
					不开通
				</label>
				<span class="help-block">是否开通GPRS功能(会增加消耗SIM卡流量),默认不开通</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">自动打印</label>
			<div class="col-sm-8">
				<label class="radio-inline">
					<input type="radio" name="printer[autoprint]" ng-model="autoprint.switch" value="1"/>
					开启
				</label>
				<label class="radio-inline">
					<input type="radio" name="printer[autoprint]" ng-model="autoprint.switch" value="0"/>
					关闭
				</label>
				<span class="help-block">设置自动打印模式,开启时收到有效信息自动打印,关闭时收到有效信息需要按左键及print键才可以打印,默认为自动打印</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">普通串口打印</label>
			<div class="col-sm-8">
				<label class="radio-inline">
					<input type="radio" name="printer[ordinary]" ng-model="ordinary.switch" value="1"/>
					开启
				</label>
				<label class="radio-inline">
					<input type="radio" name="printer[ordinary]" ng-model="ordinary.switch" value="0"/>
					关闭
				</label>
				<span class="help-block">设置普通串口打印模式,开启时可以作为普通串口打印机使用,关闭时不可以作为普通串口打印机使用,默认为不可以</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">错误状态蜂鸣</label>
			<div class="col-sm-8">
				<label class="radio-inline">
					<input type="radio" name="printer[buzzing]" ng-model="buzzing.switch" value="1"/>
					开启
				</label>
				<label class="radio-inline">
					<input type="radio" name="printer[buzzing]" ng-model="buzzing.switch" value="0"/>
					关闭
				</label>
				<span class="help-block">设置错误状态时蜂鸣,默认为蜂鸣<br/>具体定义如下：
					当打印机没有装SIM卡或信号强度很弱不足通讯时，每2秒钟闪烁下红灯。当打印机缺纸或过热，或GPRS模式没有连接到后台时，蜂鸣器和红色LED灯每隔1秒响1.6秒。
					如果一切正常，待机状态双色灯为绿灯，只有收到打印信息蜂鸣器才响1次。如果GPRS模式，收到有效打印数据时也会蜂鸣。
				</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">上网协议模式</label>
			<div class="col-sm-8">
				<label class="radio-inline">
					<input type="radio" name="printer[protocol]" ng-model="protocol.switch" value="1"/>
					HTTP访问模式
				</label>
				<label class="radio-inline">
					<input type="radio" name="printer[protocol]" ng-model="protocol.switch" value="0"/>
					SOCKET协议访问模式
				</label>
				<span class="help-block">设置GPRS上网协议模式,默认为HTTP访问模式</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">站点主机名</label>
			<div class="col-sm-9">
				<input type="text" name="printer[host]" class="form-control" value="" autocomplete="off"/>
				<span class="help-block">设置HTTP访问模式时,GPRS站点主机名</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">上网连接模式</label>
			<div class="col-sm-8">
				<label class="radio-inline">
					<input type="radio" name="printer[connect]" ng-model="connect.switch" value="1"/>
					长连接
				</label>
				<label class="radio-inline">
					<input type="radio" name="printer[connect]" ng-model="connect.switch" value="0"/>
					短连接
				</label>
				<span class="help-block">设置HTTP上网连接模式,默认为长连接<br/>
					具体定义如下:长连模式:打印终端收到平台信息后未断开GPRS网络，只是关掉底层HTTP SOCKET 然后再次连接，此模式访问速度比较快但比较耗SIM卡GPRS流量<br/>
								 短连模式:收到后台信息后终端主动断开网络，然后根据GPRS的采集时间定时再次访问HTTP网页。	
				</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">访问后台时间</label>
			<div class="col-sm-9">
				<input type="text" name="printer[backstage]" class="form-control" value="" autocomplete="off"/>
				<span class="help-block">http模式设置访问后台的的时间间隔,单位为秒(此命令在长连接模式有效)</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">IP地址后面路径</label>
			<div class="col-sm-9">
				<input type="text" name="printer[ippath]" class="form-control" value="" autocomplete="off"/>
				<span class="help-block">设置http访问IP地址后面的路径</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">短信回复</label>
			<div class="col-sm-8">
				<label class="radio-inline">
					<input type="radio" name="printer[messreply]" ng-model="messreply.switch" value="1"/>
					回复
				</label>
				<label class="radio-inline">
					<input type="radio" name="printer[messreply]" ng-model="messreply.switch" value="0"/>
					不回复
				</label>
				<span class="help-block">设置GPRS模式打印后是否短信回复打印情况(成功或失败),默认不回复</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">打印成功信息</label>
			<div class="col-sm-9">
				<textarea style="height: 100px;" class="form-control" name="printer[succinfo]"></textarea>
				<span class="help-block">设置打印成功后的回复信息的号码和内容，包括GPRS模式和短信模式<br/>
					例:18922836640：收到平台信息打印成功！<br/>
					表示打印成功后，手机号码18922836640会收到“收到平台信息打印成功！”的短信。
				</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">打印失败信息</label>
			<div class="col-sm-9">
				<textarea style="height: 100px;" class="form-control" name="printer[loseinfo]"></textarea>
				<span class="help-block">设置打印失败后的回复信息的号码和内容，包括GPRS模式和短信模式
					例:18922836640：收到平台信息打印失败！<br/>
					表示打印成功后，手机号码18922836640会收到“收到平台信息打印失败！”的短信。
				</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">访问时间段</label>
			<div class="col-sm-9">
				<input type="text" name="printer[visitime]" class="form-control" value="" autocomplete="off"/>
				<span class="help-block">设置GPRS模式HTTP访问方式时有效的时间段,采用24小时制度,打印机默认24小时都按照时间段进行访问<br/>
					例:0912表示每天访问时间段是9-12点,其他时间不访问
				</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">短信开头命令</label>
			<div class="col-sm-9">
				<label class="radio-inline">
					<input type="radio" name="printer[messprefix]" ng-model="messprefix.switch" value="1"/>
					开启
				</label>
				<label class="radio-inline">
					<input type="radio" name="printer[messprefix]" ng-model="messprefix.switch" value="0"/>
					关闭
				</label>
				<span class="help-block">设置短信###开头才可以打印,关闭后收到任意短信直接打印,默认为开启</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">打印字体</label>
			<div class="col-sm-9">
				<input type="text" name="printer[font]" class="form-control" value="" autocomplete="off"/>
				<span class="help-block">设置当前打印行字体为正常字体(同一行必须同一种字体，如果要换字体必须先换行),默认为正常字体</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">访问密码</label>
			<div class="col-sm-9">
				<input type="text" name="printer[visitpassword]" class="form-control" value="" autocomplete="off"/>
				<span class="help-block">设置用户访问HTTP网页时访问密码,默认为空,即没有设置密码</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">机器访问模式</label>
			<div class="col-sm-8">
				<label class="radio-inline">
					<input type="radio" name="printer[visitmode]" ng-model="visitmode.switch" value="1"/>
					IMEI模式
				</label>
				<label class="radio-inline">
					<input type="radio" name="printer[visitmode]" ng-model="visitmode.switch" value="0"/>
					IMSI模式
				</label>
				<span class="help-block">设置HTTP模式时,机器的访问模式,默认为IMEI模式</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">打印页眉时间</label>
			<div class="col-sm-8">
				<label class="radio-inline">
					<input type="radio" name="printer[headertime]" ng-model="headertime.switch" value="1"/>
					打印
				</label>
				<label class="radio-inline">
					<input type="radio" name="printer[headertime]" ng-model="headertime.switch" value="0"/>
					不打印
				</label>
				<span class="help-block">设置是否打印页眉的时间,默认打印</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">LOGO打印位置</label>
			<div class="col-sm-8">
				<label class="radio-inline">
					<input type="radio" name="printer[logo]" ng-model="logo.switch" value="1"/>
					打印在页头位置
				</label>
				<label class="radio-inline">
					<input type="radio" name="printer[logo]" ng-model="logo.switch" value="0"/>
					不打印
				</label>
				<label class="radio-inline">
					<input type="radio" name="printer[logo]" ng-model="logo.switch" value="2"/>
					打印在页尾位置
				</label>
				<span class="help-block">设置是否打印LOGO,默认不打印</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">图片下载模式</label>
			<div class="col-sm-8">
				<label class="radio-inline">
					<input type="radio" name="printer[downmode]" ng-model="downmode.switch" value="1"/>
					ASCII模式
				</label>
				<label class="radio-inline">
					<input type="radio" name="printer[downmode]" ng-model="downmode.switch" value="0"/>
					16进制模式
				</label>
				<span class="help-block">设置图片下载模式,默认为ASCII模式</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">新数据发送后台</label>
			<div class="col-sm-8">
				<label class="radio-inline">
					<input type="radio" name="printer[newdata]" ng-model="newdata.switch" value="1"/>
					发送
				</label>
				<label class="radio-inline">
					<input type="radio" name="printer[newdata]" ng-model="newdata.switch" value="0"/>
					不发送
				</label>
				<span class="help-block">设置收到新数据后是否发送给后台,默认不发送<br/>
					具体定义如下:当设置为发送时,如果打印机没有按键给后台,收到新的打印数据时打印机每隔12秒钟左右蜂鸣1次提醒用户按键确认
				</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">上传打印id</label>
			<div class="col-sm-8">
				<label class="radio-inline">
					<input type="radio" name="printer[upmode]" ng-model="upmode.switch" value="1"/>
					开启
				</label>
				<label class="radio-inline">
					<input type="radio" name="printer[upmode]" ng-model="upmode.switch" value="0"/>
					关闭
				</label>
				<span class="help-block">设置http模式请求时上传打印的id的功能,默认为关闭</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">蜂鸣次数</label>
			<div class="col-sm-9">
				<input type="text" name="printer[buzzingnums]" class="form-control" value="" autocomplete="off"/>
				<span class="help-block">设置GPRS模式收到打印数据时蜂鸣响声的次数,默认为2</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">打印一维码</label>
			<div class="col-sm-9">
				<input type="text" name="printer[onecode]" class="form-control" value="" autocomplete="off"/>
				<span class="help-block">打印一维码(此功能仅支持有动态一维码打印的驱动板，具体联系销售)<br/>
					具体定义如下:%40nxxxxxx:<br/>n是一维码的字符串长度为1 ~ 14,10-14分别用字母a-e表示,xxxxxx是一维码CODE128的字符串
				</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">打印二维码</label>
			<div class="col-sm-9">
				<input type="text" name="printer[twocode]" class="form-control" value="" autocomplete="off"/>
				<span class="help-block">打印二维码(此功能仅支持有动态二维码打印的驱动板，具体联系销售)<br/>
					具体定义如下:%50SPLxxxxxx:<br/>
								 S二维码的纠错等级0 ~ 3,默认为1。
								 P二维码的模块大小2 ~ 8,默认为4。
								 L二维码字符串的长度(16进制,如少16,前面加0,比如12长度为0C)
								 xxxxxx是二维码的字符串
				</span>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">短信打印功能</label>
			<div class="col-sm-8">
				<label class="radio-inline">
					<input type="radio" name="printer[messprint]" ng-model="messprint.switch" value="1"/>
					开启
				</label>
				<label class="radio-inline">
					<input type="radio" name="printer[messprint]" ng-model="messprint.switch" value="0"/>
					关闭
				</label>
				<span class="help-block">设置是否开启短信打印功能,默认开启</span>
			</div>
		</div>
	</form>
</div>
{template 'common/footer'}
